<?php
$conn=mysqli_connect("127.0.0.1","root","","uniqlo");
mysqli_query($conn,"SET NAMES utf8");
// $sql = "SELECT * FROM banner";
$sql = "select * from banner order by id desc limit 3";
$result=mysqli_query($conn,$sql);
$arr=[];
while(($row=mysqli_fetch_assoc($result))!=null){
    array_push($arr,$row);
}
echo json_encode($arr);
?>